<%@ page contentType="text/html;charset=UTF-8"%>
 <%@page import="com.ejoysoft.wlanyz.system.SysPara1"%>
<%@page import="com.ejoysoft.common.exception.IdObjectException"%>
<%@page import="com.ejoysoft.common.Constants"%>
<%@ include file="../include/jsp/head.jsp"%>
<%try{
     String strId=ParamUtil.getString(request,"strId","");
       if(strId.equals(""))
       throw new IdObjectException("请求处理的信息id为空！或者已经不存在");
       SysPara1 obj=new SysPara1(globa,false);
       String where="where strId='"+strId+"'";
       SysPara1  obj0=obj.show(where);
    if(obj0==null){
        globa.closeCon();
        throw new IdObjectException("请求处理的信息id='"+strId+"'对象为空！","请检查该信息的相关信息");
    }
    
     int intMaxSort=1;
     String  strType=ParamUtil.getString(globa.request,"strType",obj0.getStrType());
     if(strType==null)strType="";
     intMaxSort=obj.netOrder(strType);
     

     //返回页面的url
String strUrl="sysParaList.jsp";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../css/main.css" rel="stylesheet" type="text/css" />
<title><%=application.getAttribute("APP_TITLE")%></title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #F8F9FA;
}
body,td,th {
	font-size: 9pt;
	color: #111111;
}
-->
</style>

<script src="../include/js/chkFrm.js"></script>
<script language="javascript">
function chkFrm() {
        if(trim(frm.strName.value)=="") {
            alert("请输入参数名！！！")
            frm.strName.focus();
            return false;
        }
        if(trim(frm.strValue.value)=="") {
            alert("请输入参数值！！！")
            frm.strValue.focus();
            return false;
        }  
       	frm.submit();
    }
    
 function showAc(){
  frm.submit();
 }
</script>
</head>


<body>
<form name="frm" method="post" action="syspara1_act.jsp" >
<input type="hidden" name="<%=Constants.ACTION_TYPE%>" value="<%=Constants.UPDATE_STR%>">
<input type="hidden" name=strId value="<%=obj0.getStrId()%>">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><img src="../images/ri_list.jpg" width="14" height="14" align="absbottom" />&nbsp;您现在所在的位置：<font color="#0e7cc9">参数管理</font> &gt; 参数修改1 </td>
  </tr>
</table>
<br>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr>
    <td width="6%" class="listtit1"  style="border-left:1px solid #32a4ea;">&nbsp;参数修改1</td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" class="listd" style="border-left:1px solid #dddddd;border-right:1px solid #dddddd;"><table width="702" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="20" colspan="4">&nbsp;</td>
      </tr>
      <tr>
        <td width="128" align="right">&nbsp;</td>
        <td width="100"  align="right" class="tdwz">参数类型：</td>
        <td width="262"><select name="strType" onChange="chgType(this.value,frm.strId.value)" class="input_box">
                 <option value="" <%if(strType.equals("")) out.print("selected");%>>=选择参数类型=</option>
                 
                    <%
                  //从全局变量中读取参数类型
                  String paramType = (String)application.getAttribute("PARAM_TYPE");
                  String[] paramTypes = paramType.split(",");
                  for (int i = 0; i < paramTypes.length; i++) {
                   
              %>
                <option value="<%=paramTypes[i]%>" <%if(strType.equals(paramTypes[i]))out.print("selected");%>><%=paramTypes[i]%></option>
              
              <%
                  }
              %>
                 </select></td>
        <td width="212">&nbsp;</td>
      </tr>
      <tr>
        <td width="128" align="right">&nbsp;</td>
        <td width="100"  align="right" class="tdwz">参数名：</td>
        <td width="262"><input name="strName" type="text"  value="<%=obj0.getStrName()%>" class="ipt" /></td>
        <td width="212">&nbsp;</td>
      </tr>
      <tr>
        <td align="right">&nbsp;</td>
        <td align="right" class="tdwz">参数值：</td>
        <td><input name="strValue" type="text"  value="<%=obj0.getStrValue()%>" class="ipt"/></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td align="right">&nbsp;</td>
        <td align="right" class="tdwz">序　　号：</td>
        <td><select name="intSort"  class="forms_color1">
                 <%
                       for (int i=intMaxSort;i>=1;i--){
                   %>
                    <option value="<%=i%>" <%if(i==obj0.getIntSort()) out.print("selected");%>><%=i%></option>
                    <%}%>
                      </select></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td align="right">&nbsp;</td>
        <td align="right" class="tdwz">状　　态：</td>
        <td><input type="radio" name="strState" value="正常" <%=(obj0.getStrState().equals("正常")?"checked":"")%> class="input_box">
                  正常
                  <input type="radio" name="strState" value="禁用"  <%=(obj0.getStrState().equals("禁用")?"checked":"")%> class="input_box">
                  禁用</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td align="right">&nbsp;</td>
        <td height="50" align="left">&nbsp;&nbsp;</td>
        <td height="50" colspan="2" align="left"><input name="B1" type="button"  value="确  定" onclick="chkFrm()" class="ipt1" style="cursor:hand"/>
          &nbsp;<input name="B12" type="reset" value="取 消" class="ipt2" style="cursor:hand"/>
          &nbsp;<input name="B12" type="button"  onclick="window.location.href='syspara1_list.jsp';" value="返 回" class="ipt2" style="cursor:hand"/></td>
        </tr>
    </table>
 </form>
</body>
</html>
<%}catch(Exception e){e.printStackTrace();} %>
<%@ include file="../include/jsp/footer.jsp"%>